<!DOCTYPE html>
<html lang="en">
<style>
    html{background-color: #333;}
    .logininput{width: 400px;height: 200px; margin:15% auto;vertical-align:middle;}
</style>
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<link href="../page/layui/css/layui.css" rel="stylesheet">
<link href="../page/layui/css/modules/laydate/laydate.css" rel="stylesheet">
<link href="../page/layui/css/modules/layer/default/layer.css" rel="stylesheet">
<link href="../page/layui/css/modules/code.css" rel="stylesheet">
<link href="../page/layui/css/layui.mobile.css" rel="stylesheet">
<body>
    <div class="logininput">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">输入框</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required  lay-verify="email" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密&nbsp&nbsp&nbsp&nbsp码</label>
                <div class="layui-input-block">
                    <input type="password" name="password" required lay-verify="pass" placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
                <!--<div class="layui-form-mid layui-word-aux">辅助文字</div>-->
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</body>

<script src="../page/jquery-1.10.1.min.js"></script>
<script src="../page/layui/layui.js"></script>
<script>
    //初始化form
    layui.use('form', function(){
        var form = layui.form();
        //表单验证
        form.verify({
            pass: [
                /^[\S]{6,99}$/
                ,'密码必须6位以上，且不能出现空格'
            ]
        });

    });
</script>
</html>